//package com.sleep.psy.main_server.config;
//
//import lombok.Data;
//import org.redisson.Redisson;
//import org.redisson.api.RedissonClient;
//import org.redisson.config.Config;
//import org.springframework.boot.context.properties.ConfigurationProperties;
//import org.springframework.cache.annotation.EnableCaching;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import redis.clients.jedis.JedisPool;
//import redis.clients.jedis.JedisPoolConfig;
//
//
//@Configuration
//@EnableCaching
//@ConfigurationProperties(prefix = "spring.redis",ignoreInvalidFields = true)
//@Data
//public class RedisConfig {
//
//    private String host;
//    private int port;
//    private int timeout;
//    private String password;
//    private JedisPoolConfig pool;
//    private int database;
//
//    @Bean
//    public RedissonClient redissonClient(){
//        Config config = new Config();
//        config.useSingleServer().setPassword(password).setAddress("http://"+host+":"+port).setDatabase(database);
//        return Redisson.create(config);
//    }
//    @Bean
//    public JedisPool redisPoolFactory() {
//        JedisPool jedisPool = new JedisPool(pool, host, port, timeout, password,database);
//        return jedisPool;
//    }
//}
//
